import {Router,Route,Switch } from 'react-router-dom'
import { history } from './utils/history'

import Home from './pages/Home/Home'
import Login from './pages/Login/Login'
import NotFound404 from './pages/NotFound/404'
import PrivateRoute from './components/AuthRoute '

function App() {
  return (
    <div style={{height:'100%'}}>
      <Router history={history}>
      <Switch>
        <Route path='/login' component={Login}></Route>
        {/* <Route path='/login' render={()=>{return <Login/>}}></Route> */}
        <PrivateRoute path='/home' component={Home}></PrivateRoute>
        {/* <Route path='/home' render={()=>{return <Home/>}}></Route> */}
        <Route component={NotFound404}></Route>
      </Switch>
      </Router>
     
    </div>
  );
}

export default App;
